﻿<Page
    RequestedTheme="Light"
    x:Class="wToggl.ClientPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:wToggl"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    DataContext="{Binding RelativeSource={RelativeSource Self}}"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <Page.BottomAppBar>
        <CommandBar ClosedDisplayMode="Compact">
            <CommandBar.PrimaryCommands>
                <AppBarButton Visibility="Visible" IsEnabled="True" Label="Back" Name="BackButton" Click="BackButton_OnClick" >
                    <SymbolIcon Symbol="Back"/>
                </AppBarButton>
                <AppBarButton Visibility="Visible" IsEnabled="True" Label="Save" Name="SaveItemButton" Click="SaveItemButton_OnClick" >
                    <SymbolIcon Symbol="Save"/>
                </AppBarButton>
            </CommandBar.PrimaryCommands>
        </CommandBar>
    </Page.BottomAppBar>
    
    <Grid x:Name="LayoutRoot">

        <Grid.ChildrenTransitions>
            <TransitionCollection>
                <EntranceThemeTransition/>
            </TransitionCollection>
        </Grid.ChildrenTransitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <local:BackgroundWorkOverlay Grid.RowSpan="2" Canvas.ZIndex="10" IsVisible="{Binding IsWorking}" OverlayMessage="{Binding OverlayMessage}"/>
        <!-- Title Panel -->
        <StackPanel Grid.Row="0" Margin="19,0,0,0">
            <TextBlock Text="Toggly" Style="{ThemeResource TitleTextBlockStyle}" Margin="0,12,0,0"/>
            <TextBlock Text="Client details" Margin="0,-6.5,0,26.5" Style="{ThemeResource HeaderTextBlockStyle}" CharacterSpacing="{ThemeResource PivotHeaderItemCharacterSpacing}"/>
        </StackPanel>

        <!--TODO: Content should be placed within the following grid-->
        <Grid Grid.Row="1" x:Name="ContentRoot" Margin="19,9.5,19,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBox Header="Client name" Text="{Binding ClientName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        </Grid>
    </Grid>
</Page>
